package com.coolingme;

import lombok.extern.slf4j.Slf4j;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.scheduling.annotation.EnableAsync;
import org.springframework.scheduling.annotation.EnableScheduling;
import org.springframework.transaction.annotation.EnableTransactionManagement;

/**
 * 启动类
 *
 * @author wangyue
 * @date 2020/7/27 14:53
 */
@Slf4j
@MapperScan("com.coolingme.mapper") // 扫描mapper
@EnableAsync // 开启异步任务
@EnableScheduling   // 开启定时任务
@EnableTransactionManagement  // 开启事务
@SpringBootApplication
public class AppCooling {

    public static void main(String[] args) {
        // Banner.Mode.OFF 关闭 替换启动
        /*
        SpringApplication springApplication = new SpringApplication(Application.class);
        springApplication.setBannerMode(Banner.Mode.OFF);
         */

        SpringApplication.run(AppCooling.class, args);
        log.info("========start success========");
    }

}
